\(\int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx\) [52]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 36, antiderivative size = 190 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=-\frac {35 (4 A-5 B) c^4 x}{8 a}-\frac {35 (4 A-5 B) c^4 \cos ^3(e+f x)}{12 a f}-\frac {35 (4 A-5 B) c^4 \cos (e+f x) \sin (e+f x)}{8 a f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{f (a+a \sin (e+f x))^5}-\frac {2 a^2 (4 A-5 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {7 (4 A-5 B) c^4 \cos ^5(e+f x)}{4 f (a+a \sin (e+f x))} \]

[Out]

-35/8*(4*A-5*B)*c^4*x/a-35/12*(4*A-5*B)*c^4*cos(f*x+e)^3/a/f-35/8*(4*A-5*B)*c^4*cos(f*x+e)*sin(f*x+e)/a/f-a^4*
(A-B)*c^4*cos(f*x+e)^9/f/(a+a*sin(f*x+e))^5-2*a^2*(4*A-5*B)*c^4*cos(f*x+e)^7/f/(a+a*sin(f*x+e))^3-7/4*(4*A-5*B
)*c^4*cos(f*x+e)^5/f/(a+a*sin(f*x+e))

Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3046, 2938, 2759, 2758, 2761, 2715, 8} \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=-\frac {a^4 c^4 (A-B) \cos ^9(e+f x)}{f (a \sin (e+f x)+a)^5}-\frac {2 a^2 c^4 (4 A-5 B) \cos ^7(e+f x)}{f (a \sin (e+f x)+a)^3}-\frac {35 c^4 (4 A-5 B) \cos ^3(e+f x)}{12 a f}-\frac {7 c^4 (4 A-5 B) \cos ^5(e+f x)}{4 f (a \sin (e+f x)+a)}-\frac {35 c^4 (4 A-5 B) \sin (e+f x) \cos (e+f x)}{8 a f}-\frac {35 c^4 x (4 A-5 B)}{8 a} \]

[In]

Int[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^4)/(a + a*Sin[e + f*x]),x]

[Out]

(-35*(4*A - 5*B)*c^4*x)/(8*a) - (35*(4*A - 5*B)*c^4*Cos[e + f*x]^3)/(12*a*f) - (35*(4*A - 5*B)*c^4*Cos[e + f*x
]*Sin[e + f*x])/(8*a*f) - (a^4*(A - B)*c^4*Cos[e + f*x]^9)/(f*(a + a*Sin[e + f*x])^5) - (2*a^2*(4*A - 5*B)*c^4
*Cos[e + f*x]^7)/(f*(a + a*Sin[e + f*x])^3) - (7*(4*A - 5*B)*c^4*Cos[e + f*x]^5)/(4*f*(a + a*Sin[e + f*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2758

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[g*(g*C
os[e + f*x])^(p - 1)*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + p))), x] + Dist[g^2*((p - 1)/(a*(m + p))), Int[(g
*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0]
&& LtQ[m, -1] && GtQ[p, 1] && (GtQ[m, -2] || EqQ[2*m + p + 1, 0] || (EqQ[m, -2] && IntegerQ[p])) && NeQ[m + p,
 0] && IntegersQ[2*m, 2*p]

Rule 2759

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[2*g*(g
*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(2*m + p + 1))), x] + Dist[g^2*((p - 1)/(b^2*(2*m +
p + 1))), Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && Eq
Q[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] && NeQ[2*m + p + 1, 0] &&  !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*
p]

Rule 2761

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g*((g*Cos[e
 + f*x])^(p - 1)/(b*f*(p - 1))), x] + Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g
}, x] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]

Rule 2938

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(2*m + p
 + 1))), x] + Dist[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^
(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[
m + p], 0]) && NeQ[2*m + p + 1, 0]

Rule 3046

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rubi steps \begin{align*} \text {integral}& = \left (a^4 c^4\right ) \int \frac {\cos ^8(e+f x) (A+B \sin (e+f x))}{(a+a \sin (e+f x))^5} \, dx \\ & = -\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{f (a+a \sin (e+f x))^5}-\left (a^3 (4 A-5 B) c^4\right ) \int \frac {\cos ^8(e+f x)}{(a+a \sin (e+f x))^4} \, dx \\ & = -\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{f (a+a \sin (e+f x))^5}-\frac {2 a^2 (4 A-5 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^3}-\left (7 a (4 A-5 B) c^4\right ) \int \frac {\cos ^6(e+f x)}{(a+a \sin (e+f x))^2} \, dx \\ & = -\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{f (a+a \sin (e+f x))^5}-\frac {2 a^2 (4 A-5 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {7 (4 A-5 B) c^4 \cos ^5(e+f x)}{4 f (a+a \sin (e+f x))}-\frac {1}{4} \left (35 (4 A-5 B) c^4\right ) \int \frac {\cos ^4(e+f x)}{a+a \sin (e+f x)} \, dx \\ & = -\frac {35 (4 A-5 B) c^4 \cos ^3(e+f x)}{12 a f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{f (a+a \sin (e+f x))^5}-\frac {2 a^2 (4 A-5 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {7 (4 A-5 B) c^4 \cos ^5(e+f x)}{4 f (a+a \sin (e+f x))}-\frac {\left (35 (4 A-5 B) c^4\right ) \int \cos ^2(e+f x) \, dx}{4 a} \\ & = -\frac {35 (4 A-5 B) c^4 \cos ^3(e+f x)}{12 a f}-\frac {35 (4 A-5 B) c^4 \cos (e+f x) \sin (e+f x)}{8 a f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{f (a+a \sin (e+f x))^5}-\frac {2 a^2 (4 A-5 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {7 (4 A-5 B) c^4 \cos ^5(e+f x)}{4 f (a+a \sin (e+f x))}-\frac {\left (35 (4 A-5 B) c^4\right ) \int 1 \, dx}{8 a} \\ & = -\frac {35 (4 A-5 B) c^4 x}{8 a}-\frac {35 (4 A-5 B) c^4 \cos ^3(e+f x)}{12 a f}-\frac {35 (4 A-5 B) c^4 \cos (e+f x) \sin (e+f x)}{8 a f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{f (a+a \sin (e+f x))^5}-\frac {2 a^2 (4 A-5 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^3}-\frac {7 (4 A-5 B) c^4 \cos ^5(e+f x)}{4 f (a+a \sin (e+f x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 12.48 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.44 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (c-c \sin (e+f x))^4 \left (3072 (A-B) \sin \left (\frac {1}{2} (e+f x)\right )-420 (4 A-5 B) (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )-24 (47 A-75 B) \cos (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+8 (A-5 B) \cos (3 (e+f x)) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+24 (5 A-12 B) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin (2 (e+f x))+3 B \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin (4 (e+f x))\right )}{96 a f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^8 (1+\sin (e+f x))} \]

[In]

Integrate[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^4)/(a + a*Sin[e + f*x]),x]

[Out]

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(c - c*Sin[e + f*x])^4*(3072*(A - B)*Sin[(e + f*x)/2] - 420*(4*A - 5*B)
*(e + f*x)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) - 24*(47*A - 75*B)*Cos[e + f*x]*(Cos[(e + f*x)/2] + Sin[(e +
f*x)/2]) + 8*(A - 5*B)*Cos[3*(e + f*x)]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) + 24*(5*A - 12*B)*(Cos[(e + f*x)
/2] + Sin[(e + f*x)/2])*Sin[2*(e + f*x)] + 3*B*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*Sin[4*(e + f*x)]))/(96*a*
f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^8*(1 + Sin[e + f*x]))

Maple [A] (verified)

Time = 0.81 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.10

method result size
derivativedivides \(\frac {2 c^{4} \left (-\frac {16 A -16 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {\left (\frac {5 A}{2}-\frac {47 B}{8}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (11 A -15 B \right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (\frac {5 A}{2}-\frac {55 B}{8}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (35 A -55 B \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-\frac {5 A}{2}+\frac {55 B}{8}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (\frac {107 A}{3}-\frac {175 B}{3}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-\frac {5 A}{2}+\frac {47 B}{8}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\frac {35 A}{3}-\frac {55 B}{3}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}-\frac {35 \left (4 A -5 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}\right )}{f a}\) \(209\)
default \(\frac {2 c^{4} \left (-\frac {16 A -16 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {\left (\frac {5 A}{2}-\frac {47 B}{8}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (11 A -15 B \right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (\frac {5 A}{2}-\frac {55 B}{8}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (35 A -55 B \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-\frac {5 A}{2}+\frac {55 B}{8}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (\frac {107 A}{3}-\frac {175 B}{3}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-\frac {5 A}{2}+\frac {47 B}{8}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\frac {35 A}{3}-\frac {55 B}{3}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}-\frac {35 \left (4 A -5 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}\right )}{f a}\) \(209\)
parallelrisch \(-\frac {7 c^{4} \left (\left (30 f x A -\frac {75}{2} f x B +\frac {1189}{14} A -\frac {1433}{14} B \right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (30 f x A -\frac {75}{2} f x B +\frac {139}{14} A -\frac {215}{14} B \right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+9 \left (A -\frac {3 B}{2}\right ) \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (A -\frac {31 B}{14}\right ) \cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\frac {\left (-A +\frac {37 B}{8}\right ) \cos \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )}{14}+9 \left (A -\frac {3 B}{2}\right ) \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (-A +\frac {31 B}{14}\right ) \sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\frac {\left (-A +\frac {37 B}{8}\right ) \sin \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )}{14}+\frac {3 B \left (\cos \left (\frac {9 f x}{2}+\frac {9 e}{2}\right )-\sin \left (\frac {9 f x}{2}+\frac {9 e}{2}\right )\right )}{112}\right )}{12 a f \left (\sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\) \(212\)
risch \(-\frac {35 c^{4} x A}{2 a}+\frac {175 c^{4} x B}{8 a}-\frac {47 c^{4} {\mathrm e}^{i \left (f x +e \right )} A}{8 a f}+\frac {75 c^{4} {\mathrm e}^{i \left (f x +e \right )} B}{8 a f}-\frac {47 c^{4} {\mathrm e}^{-i \left (f x +e \right )} A}{8 a f}+\frac {75 c^{4} {\mathrm e}^{-i \left (f x +e \right )} B}{8 a f}-\frac {32 c^{4} A}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {32 c^{4} B}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {B \,c^{4} \sin \left (4 f x +4 e \right )}{32 a f}+\frac {c^{4} \cos \left (3 f x +3 e \right ) A}{12 a f}-\frac {5 c^{4} \cos \left (3 f x +3 e \right ) B}{12 a f}+\frac {5 c^{4} \sin \left (2 f x +2 e \right ) A}{4 a f}-\frac {3 c^{4} \sin \left (2 f x +2 e \right ) B}{a f}\) \(263\)
norman \(\frac {-\frac {166 A \,c^{4}-206 B \,c^{4}}{3 a f}-\frac {35 \left (4 A -5 B \right ) c^{4} x}{8 a}-\frac {\left (108 A \,c^{4}-167 B \,c^{4}\right ) \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 a f}-\frac {\left (148 A \,c^{4}-175 B \,c^{4}\right ) \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 a f}-\frac {\left (204 A \,c^{4}-331 B \,c^{4}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a f}-\frac {2 \left (206 A \,c^{4}-230 B \,c^{4}\right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {2 \left (212 A \,c^{4}-340 B \,c^{4}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}-\frac {\left (220 A \,c^{4}-299 B \,c^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{12 a f}-\frac {\left (384 A \,c^{4}-431 B \,c^{4}\right ) \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a f}-\frac {\left (508 A \,c^{4}-767 B \,c^{4}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{6 a f}-\frac {\left (2708 A \,c^{4}-3127 B \,c^{4}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{6 a f}-\frac {\left (2996 A \,c^{4}-3619 B \,c^{4}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{12 a f}-\frac {35 \left (4 A -5 B \right ) c^{4} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{8 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 a}-\frac {175 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 a}-\frac {35 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 a}-\frac {35 \left (4 A -5 B \right ) c^{4} x \left (\tan ^{11}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 a}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{5} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) \(681\)

[In]

int((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

2/f*c^4/a*(-(16*A-16*B)/(tan(1/2*f*x+1/2*e)+1)-((5/2*A-47/8*B)*tan(1/2*f*x+1/2*e)^7+(11*A-15*B)*tan(1/2*f*x+1/
2*e)^6+(5/2*A-55/8*B)*tan(1/2*f*x+1/2*e)^5+(35*A-55*B)*tan(1/2*f*x+1/2*e)^4+(-5/2*A+55/8*B)*tan(1/2*f*x+1/2*e)
^3+(107/3*A-175/3*B)*tan(1/2*f*x+1/2*e)^2+(-5/2*A+47/8*B)*tan(1/2*f*x+1/2*e)+35/3*A-55/3*B)/(1+tan(1/2*f*x+1/2
*e)^2)^4-35/8*(4*A-5*B)*arctan(tan(1/2*f*x+1/2*e)))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.37 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=-\frac {6 \, B c^{4} \cos \left (f x + e\right )^{5} - 8 \, {\left (A - 5 \, B\right )} c^{4} \cos \left (f x + e\right )^{4} + {\left (52 \, A - 113 \, B\right )} c^{4} \cos \left (f x + e\right )^{3} + 105 \, {\left (4 \, A - 5 \, B\right )} c^{4} f x + 96 \, {\left (3 \, A - 5 \, B\right )} c^{4} \cos \left (f x + e\right )^{2} + 384 \, {\left (A - B\right )} c^{4} + 3 \, {\left (35 \, {\left (4 \, A - 5 \, B\right )} c^{4} f x + {\left (204 \, A - 239 \, B\right )} c^{4}\right )} \cos \left (f x + e\right ) - {\left (6 \, B c^{4} \cos \left (f x + e\right )^{4} + 2 \, {\left (4 \, A - 17 \, B\right )} c^{4} \cos \left (f x + e\right )^{3} - 105 \, {\left (4 \, A - 5 \, B\right )} c^{4} f x + 3 \, {\left (20 \, A - 49 \, B\right )} c^{4} \cos \left (f x + e\right )^{2} - 3 \, {\left (76 \, A - 111 \, B\right )} c^{4} \cos \left (f x + e\right ) + 384 \, {\left (A - B\right )} c^{4}\right )} \sin \left (f x + e\right )}{24 \, {\left (a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f\right )}} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e)),x, algorithm="fricas")

[Out]

-1/24*(6*B*c^4*cos(f*x + e)^5 - 8*(A - 5*B)*c^4*cos(f*x + e)^4 + (52*A - 113*B)*c^4*cos(f*x + e)^3 + 105*(4*A
- 5*B)*c^4*f*x + 96*(3*A - 5*B)*c^4*cos(f*x + e)^2 + 384*(A - B)*c^4 + 3*(35*(4*A - 5*B)*c^4*f*x + (204*A - 23
9*B)*c^4)*cos(f*x + e) - (6*B*c^4*cos(f*x + e)^4 + 2*(4*A - 17*B)*c^4*cos(f*x + e)^3 - 105*(4*A - 5*B)*c^4*f*x
 + 3*(20*A - 49*B)*c^4*cos(f*x + e)^2 - 3*(76*A - 111*B)*c^4*cos(f*x + e) + 384*(A - B)*c^4)*sin(f*x + e))/(a*
f*cos(f*x + e) + a*f*sin(f*x + e) + a*f)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 6690 vs. \(2 (173) = 346\).

Time = 6.94 (sec) , antiderivative size = 6690, normalized size of antiderivative = 35.21 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=\text {Too large to display} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))**4/(a+a*sin(f*x+e)),x)

[Out]

Piecewise((-420*A*c**4*f*x*tan(e/2 + f*x/2)**9/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a
*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**
4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 420*A*c**4*f
*x*tan(e/2 + f*x/2)**8/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 +
 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x
/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 1680*A*c**4*f*x*tan(e/2 + f*x/2)**7/
(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2
)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2
 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 1680*A*c**4*f*x*tan(e/2 + f*x/2)**6/(24*a*f*tan(e/2 + f*x/2
)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2
+ f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*t
an(e/2 + f*x/2) + 24*a*f) - 2520*A*c**4*f*x*tan(e/2 + f*x/2)**5/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 +
 f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*t
an(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*
f) - 2520*A*c**4*f*x*tan(e/2 + f*x/2)**4/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan
(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96
*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 1680*A*c**4*f*x*ta
n(e/2 + f*x/2)**3/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a
*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**
3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 1680*A*c**4*f*x*tan(e/2 + f*x/2)**2/(24*a
*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6
+ 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*
x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 420*A*c**4*f*x*tan(e/2 + f*x/2)/(24*a*f*tan(e/2 + f*x/2)**9 + 24
*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)*
*5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 +
f*x/2) + 24*a*f) - 420*A*c**4*f*x/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 +
f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*ta
n(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 888*A*c**4*tan(e/2 + f*x/
2)**8/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 +
 f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*t
an(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 648*A*c**4*tan(e/2 + f*x/2)**7/(24*a*f*tan(e/2 + f*x/
2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2
 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*
tan(e/2 + f*x/2) + 24*a*f) - 3720*A*c**4*tan(e/2 + f*x/2)**6/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*
x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(
e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f)
- 1800*A*c**4*tan(e/2 + f*x/2)**5/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 +
f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*ta
n(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 6168*A*c**4*tan(e/2 + f*x
/2)**4/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2
+ f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*
tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 1592*A*c**4*tan(e/2 + f*x/2)**3/(24*a*f*tan(e/2 + f*
x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e
/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*
f*tan(e/2 + f*x/2) + 24*a*f) - 4664*A*c**4*tan(e/2 + f*x/2)**2/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 +
f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*ta
n(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f
) - 440*A*c**4*tan(e/2 + f*x/2)/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*
x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(
e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) - 1328*A*c**4/(24*a*f*tan(e/2
 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*
tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 +
24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 525*B*c**4*f*x*tan(e/2 + f*x/2)**9/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*ta
n(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 14
4*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2)
+ 24*a*f) + 525*B*c**4*f*x*tan(e/2 + f*x/2)**8/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a
*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**
4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 2100*B*c**4*
f*x*tan(e/2 + f*x/2)**7/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7
+ 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*
x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 2100*B*c**4*f*x*tan(e/2 + f*x/2)**6
/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/
2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/
2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 3150*B*c**4*f*x*tan(e/2 + f*x/2)**5/(24*a*f*tan(e/2 + f*x/
2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2
 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*
tan(e/2 + f*x/2) + 24*a*f) + 3150*B*c**4*f*x*tan(e/2 + f*x/2)**4/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2
+ f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*
tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a
*f) + 2100*B*c**4*f*x*tan(e/2 + f*x/2)**3/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*ta
n(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 9
6*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 2100*B*c**4*f*x*t
an(e/2 + f*x/2)**2/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*
a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)*
*3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 525*B*c**4*f*x*tan(e/2 + f*x/2)/(24*a*f*
tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 1
44*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2
)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 525*B*c**4*f*x/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2
)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2
 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 1
050*B*c**4*tan(e/2 + f*x/2)**8/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x
/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e
/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 1002*B*c**4*tan(e/2 + f*x/2)
**7/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f
*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan
(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 4122*B*c**4*tan(e/2 + f*x/2)**6/(24*a*f*tan(e/2 + f*x/2
)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2
+ f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*t
an(e/2 + f*x/2) + 24*a*f) + 2970*B*c**4*tan(e/2 + f*x/2)**5/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x
/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e
/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) +
 6918*B*c**4*tan(e/2 + f*x/2)**4/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f
*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan
(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 2470*B*c**4*tan(e/2 + f*x/
2)**3/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 +
 f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*t
an(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 5590*B*c**4*tan(e/2 + f*x/2)**2/(24*a*f*tan(e/2 + f*x
/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/
2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f
*tan(e/2 + f*x/2) + 24*a*f) + 598*B*c**4*tan(e/2 + f*x/2)/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2
)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2
 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f) + 1
648*B*c**4/(24*a*f*tan(e/2 + f*x/2)**9 + 24*a*f*tan(e/2 + f*x/2)**8 + 96*a*f*tan(e/2 + f*x/2)**7 + 96*a*f*tan(
e/2 + f*x/2)**6 + 144*a*f*tan(e/2 + f*x/2)**5 + 144*a*f*tan(e/2 + f*x/2)**4 + 96*a*f*tan(e/2 + f*x/2)**3 + 96*
a*f*tan(e/2 + f*x/2)**2 + 24*a*f*tan(e/2 + f*x/2) + 24*a*f), Ne(f, 0)), (x*(A + B*sin(e))*(-c*sin(e) + c)**4/(
a*sin(e) + a), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1796 vs. \(2 (182) = 364\).

Time = 0.33 (sec) , antiderivative size = 1796, normalized size of antiderivative = 9.45 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=\text {Too large to display} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/12*(B*c^4*((19*sin(f*x + e)/(cos(f*x + e) + 1) + 211*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 91*sin(f*x + e)^3
/(cos(f*x + e) + 1)^3 + 219*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 165*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 16
5*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 45*sin(f*x + e)^7/(cos(f*x + e) + 1)^7 + 45*sin(f*x + e)^8/(cos(f*x +
e) + 1)^8 + 64)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 4*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a*sin(f*x
 + e)^3/(cos(f*x + e) + 1)^3 + 6*a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 6*a*sin(f*x + e)^5/(cos(f*x + e) + 1)
^5 + 4*a*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 4*a*sin(f*x + e)^7/(cos(f*x + e) + 1)^7 + a*sin(f*x + e)^8/(cos
(f*x + e) + 1)^8 + a*sin(f*x + e)^9/(cos(f*x + e) + 1)^9) + 45*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 4*
A*c^4*((7*sin(f*x + e)/(cos(f*x + e) + 1) + 39*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 24*sin(f*x + e)^3/(cos(f*
x + e) + 1)^3 + 24*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 9*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 9*sin(f*x + e
)^6/(cos(f*x + e) + 1)^6 + 16)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^
2 + 3*a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 3*a*sin(f*x + e)^5/(co
s(f*x + e) + 1)^5 + a*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + a*sin(f*x + e)^7/(cos(f*x + e) + 1)^7) + 9*arctan(
sin(f*x + e)/(cos(f*x + e) + 1))/a) + 16*B*c^4*((7*sin(f*x + e)/(cos(f*x + e) + 1) + 39*sin(f*x + e)^2/(cos(f*
x + e) + 1)^2 + 24*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 24*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 9*sin(f*x +
e)^5/(cos(f*x + e) + 1)^5 + 9*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 16)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1)
 + 3*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*a*sin(f*x + e)^4/(cos
(f*x + e) + 1)^4 + 3*a*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + a*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + a*sin(f*x
 + e)^7/(cos(f*x + e) + 1)^7) + 9*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 48*A*c^4*((sin(f*x + e)/(cos(f*
x + e) + 1) + 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4
/(cos(f*x + e) + 1)^4 + 4)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 2*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 +
2*a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a*sin(f*x + e)^5/(cos(f*x +
e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) + 72*B*c^4*((sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin
(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)
^4 + 4)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 2*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2*a*sin(f*x + e)^3/
(cos(f*x + e) + 1)^3 + a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arct
an(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 144*A*c^4*((sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x
 + e) + 1)^2 + 2)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x +
 e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) + 96*B*c^4*((sin(f*x + e)/(cos(f*x +
e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin(f*x + e)^2/(
cos(f*x + e) + 1)^2 + a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 96
*A*c^4*(arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a + 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) + 24*B*c^4*(arc
tan(sin(f*x + e)/(cos(f*x + e) + 1))/a + 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) - 24*A*c^4/(a + a*sin(f*x
+ e)/(cos(f*x + e) + 1)))/f

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 326, normalized size of antiderivative = 1.72 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=-\frac {\frac {105 \, {\left (4 \, A c^{4} - 5 \, B c^{4}\right )} {\left (f x + e\right )}}{a} + \frac {768 \, {\left (A c^{4} - B c^{4}\right )}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}} + \frac {2 \, {\left (60 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 141 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 264 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 360 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 60 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 165 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 840 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1320 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 60 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 165 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 856 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1400 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 60 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 141 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 280 \, A c^{4} - 440 \, B c^{4}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{4} a}}{24 \, f} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e)),x, algorithm="giac")

[Out]

-1/24*(105*(4*A*c^4 - 5*B*c^4)*(f*x + e)/a + 768*(A*c^4 - B*c^4)/(a*(tan(1/2*f*x + 1/2*e) + 1)) + 2*(60*A*c^4*
tan(1/2*f*x + 1/2*e)^7 - 141*B*c^4*tan(1/2*f*x + 1/2*e)^7 + 264*A*c^4*tan(1/2*f*x + 1/2*e)^6 - 360*B*c^4*tan(1
/2*f*x + 1/2*e)^6 + 60*A*c^4*tan(1/2*f*x + 1/2*e)^5 - 165*B*c^4*tan(1/2*f*x + 1/2*e)^5 + 840*A*c^4*tan(1/2*f*x
 + 1/2*e)^4 - 1320*B*c^4*tan(1/2*f*x + 1/2*e)^4 - 60*A*c^4*tan(1/2*f*x + 1/2*e)^3 + 165*B*c^4*tan(1/2*f*x + 1/
2*e)^3 + 856*A*c^4*tan(1/2*f*x + 1/2*e)^2 - 1400*B*c^4*tan(1/2*f*x + 1/2*e)^2 - 60*A*c^4*tan(1/2*f*x + 1/2*e)
+ 141*B*c^4*tan(1/2*f*x + 1/2*e) + 280*A*c^4 - 440*B*c^4)/((tan(1/2*f*x + 1/2*e)^2 + 1)^4*a))/f

Mupad [B] (verification not implemented)

Time = 15.29 (sec) , antiderivative size = 397, normalized size of antiderivative = 2.09 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{a+a \sin (e+f x)} \, dx=-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {55\,A\,c^4}{3}-\frac {299\,B\,c^4}{12}\right )+\frac {166\,A\,c^4}{3}-\frac {206\,B\,c^4}{3}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (27\,A\,c^4-\frac {167\,B\,c^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (37\,A\,c^4-\frac {175\,B\,c^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (75\,A\,c^4-\frac {495\,B\,c^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (155\,A\,c^4-\frac {687\,B\,c^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (257\,A\,c^4-\frac {1153\,B\,c^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {199\,A\,c^4}{3}-\frac {1235\,B\,c^4}{12}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {583\,A\,c^4}{3}-\frac {2795\,B\,c^4}{12}\right )}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9+a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+6\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a\right )}-\frac {35\,c^4\,\mathrm {atan}\left (\frac {35\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,A-5\,B\right )}{140\,A\,c^4-175\,B\,c^4}\right )\,\left (4\,A-5\,B\right )}{4\,a\,f} \]

[In]

int(((A + B*sin(e + f*x))*(c - c*sin(e + f*x))^4)/(a + a*sin(e + f*x)),x)

[Out]

- (tan(e/2 + (f*x)/2)*((55*A*c^4)/3 - (299*B*c^4)/12) + (166*A*c^4)/3 - (206*B*c^4)/3 + tan(e/2 + (f*x)/2)^7*(
27*A*c^4 - (167*B*c^4)/4) + tan(e/2 + (f*x)/2)^8*(37*A*c^4 - (175*B*c^4)/4) + tan(e/2 + (f*x)/2)^5*(75*A*c^4 -
 (495*B*c^4)/4) + tan(e/2 + (f*x)/2)^6*(155*A*c^4 - (687*B*c^4)/4) + tan(e/2 + (f*x)/2)^4*(257*A*c^4 - (1153*B
*c^4)/4) + tan(e/2 + (f*x)/2)^3*((199*A*c^4)/3 - (1235*B*c^4)/12) + tan(e/2 + (f*x)/2)^2*((583*A*c^4)/3 - (279
5*B*c^4)/12))/(f*(a + a*tan(e/2 + (f*x)/2) + 4*a*tan(e/2 + (f*x)/2)^2 + 4*a*tan(e/2 + (f*x)/2)^3 + 6*a*tan(e/2
 + (f*x)/2)^4 + 6*a*tan(e/2 + (f*x)/2)^5 + 4*a*tan(e/2 + (f*x)/2)^6 + 4*a*tan(e/2 + (f*x)/2)^7 + a*tan(e/2 + (
f*x)/2)^8 + a*tan(e/2 + (f*x)/2)^9)) - (35*c^4*atan((35*c^4*tan(e/2 + (f*x)/2)*(4*A - 5*B))/(140*A*c^4 - 175*B
*c^4))*(4*A - 5*B))/(4*a*f)